<?php
/**
 * Created by PhpStorm.
 * User: chniccs
 * Date: 2019-12-16
 * Time: 16:20
 */

namespace app\helper;


use app\constant\TemplateMsgConst;

class TemplateMsgHelper
{
    public static function builderData($templateId,$data){
        if($templateId===TemplateMsgConst::TEMP_COMPLAIN_RESOLVED){
            //              {{first.DATA}}
            //              投诉人：{{keyword1.DATA}}
            //              投诉内容：{{keyword2.DATA}}
            //              受理时间：{{keyword3.DATA}}
            //              {{remark.DATA}}
            $data = [
              'first'=>'您的投诉已被受理',
                'keyword1'=>$data['data']['nickname'],
                'keyword2'=>$data['data']['content'],
                'keyword3'=>(new \DateTime())->format('Y-m-d H:i:s'),
                'remark'=>'请关注后续处理结果',
            ];
            return $data;
        }
        return [];
    }

}